<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>宠爱-举报</title>


    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <link rel="shortcut icon" th:href="@{/assets/images/favicon.ico}">

    <link rel="stylesheet" th:href="@{/assets/css/vendor/vendor.min.css}">
    <link rel="stylesheet" th:href="@{/assets/css/plugins/plugins.min.css}">
    <link rel="stylesheet" th:href="@{/assets/css/style.min.css}">
    <script th:src="@{/assets/js/jquery-3.2.1.slim.min.js}"></script>
    <script th:src="@{/assets/js/vendor.min.js}"></script>
    <script th:src="@{/assets/js/plugins.min.js}"></script>

    <!--Main JS-->
    <script th:src="@{/assets/js/main.js}"></script>
    <script th:src="@{/assets/js/vue.js}"></script>
    <script type="text/javascript" th:src="@{/assets/js/axios.min.js}"></script>


</head>

<body>

    <!-- 头部信息+菜单栏 -->
    <div class="header section" th:replace="~{common/head::head}"></div>
    <!-- Header Section End -->
    <!-- Register Section Start -->
    <div class="section section-margin">
        <div class="container">
            <div class="row">
                <div class="col-lg-7 col-md-8 m-auto">
                    <div class="login-wrapper">
                        <div class="section-content text-center m-b-30">
                            <h2 class="title m-b-10">举报</h2>
                        </div>
                                <!-- Input First Name Start -->
                                <!-- Input Password Start -->
                                <input type="hidden" th:value="${dynamicId}" id="dynamicId">
                                <div class="single-input-item m-b-10">
                                    <div class="input-item m-b-20">
                                        <textarea id="content" cols="25" rows="4" class="rounded-0 w-100 custom-textarea input-area" placeholder="请输入举报原因" spellcheck="false" data-gramm="false"></textarea>
                                    </div>
                                </div>
                                <!-- Input Password End -->
                                <!-- Button/Forget Password Start -->
                                <input type="button" onclick="toreport()" value="提交">
                                <!-- Button/Forget Password End -->

                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 页末信息 -->
    <footer class="section footer-section" th:replace="~{common/foot::foot}"></footer>

    <script src="../static/assets/js/vendor.min.js"></script>
    <script src="../static/assets/js/plugins.min.js"></script>

    <!--Main JS-->
    <script src="../static/assets/js/main.js"></script>
</body>
<script th:inline="javascript">
    function toreport() {
        let dynamicId = [[${dynamicId}]];

        console.log(dynamicId)

        let content = $('#content').val();
        console.log(content)
        $.ajax({
            url: "/report1/report",
            type: "post",
            data: {
                "dynamicId": dynamicId,
                "content": content
            },
            success: function (result) {
                location="http://localhost:9001/dynamic/queryDynamic?DynamicId="+dynamicId
            }
        })


    }
</script>




</html>